#!/bin/sh

IP=`ifconfig eth1 | grep -oP "inet addr:\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" | grep -oP "[\d\.]*"`

LINK="start \"\" http://$IP/$1"

NEWSUM=`printf '%s\n' "$LINK" | md5sum | cut -d " " -f1`
OLDSUM=`md5sum $2 | cut -d " " -f1`

if [ "$NEWSUM" != "$OLDSUM" ]; then
  #echo "File Updated"
  printf '%s\n' "$LINK" > $2
fi
